<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-add">
			<div class="form-group">
				<label class="col-sm-3 control-label"><span style="color: red; ">*</span>项目名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" required>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">模板：</label>
				<div class="col-sm-8">
					<select name="temp.id" class="form-control">
                        <option th:each="temp : ${tempList}" th:text="${temp.name}" th:value="${temp.id}" required></option>
                    </select>
				</div>
			</div>
				
			<div class="form-group">
				<label class="col-sm-3 control-label">说明：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "task/project";
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-add').serialize());
	        }
	    }
		
		$("#form-add").validate({
			onkeyup: false,
			rules:{
				sort:{
					digits:true
				}
			},
			messages: {
		        
		    },
		    focusCleanup: true
		});
		
	</script>
</body>
</html>
